/* 
 * File:   Scheduler.h
 * Author: James
 *
 * Created on November 7, 2010, 7:44 AM
 */

#ifndef SCHEDULER_H
#define	SCHEDULER_H

#include "Compare.cpp"
#include "Clock.h"
#include <queue>
using namespace std;

class Scheduler {
public:
    Scheduler() {};
    virtual void run(){};
    virtual void scheduleProcesses(){};

protected:
    Clock clock;
    int nProcs; // number of processes - also the size of the processes array
    int procIndex; // current index in processes
    Process* curProcess;
    Process* processes; // construct with the sorted, new'd array
    // IO queue - processes with the lowest IOcompletion are first
    priority_queue<Process, vector<Process>, CompareIOCompletion> IOQueue;
};




#endif	/* SCHEDULER_H */

